
// 数组乱序, 洗牌算法
const shuffle = (arr) => {
  let i = arr.length
  while (i) {
    let j = Math.floor(Math.random() * i--)
    // arr[j], arr[i] = arr[i], arr[j]
    const temp = arr[j]
    arr[j] = arr[i]
    arr[i] = temp
  }
}
